#define _CRT_SECURE_NO_WARNINGS

#include "my_homework_function.h"

int main() {
	/*
	// [test 0201] change_number
	int input = 0;
	do {
		printf("Please input a number:>");
        scanf("%d", &input);
		if (input != -1) {
			int ret = change_number(input);
			printf("Result: %d\n", ret);
		}
	} while (input != -1);
	*/

	/*
	// [test 0202] print_right_triangle
	int input = 0;
	do {
		printf("Please enter side lengths of right triangle:>");
		scanf("%d", &input);
		if (input > 0) {
			print_right_triangle(input);
		}
	} while (input > 0);
	*/

	/*
	// [test 0203] left_rotate
	char arr[20] = { 0 };
	int key = 0;
	do {
		printf("Please input a string:v\n");
		gets(arr);
		if (*arr != '0') {
			printf("Please input rotation length:>");
			scanf("%d", &key);
			getchar();
			int len = strlen(arr);
			printf("Result: %s\n", left_rotate2(arr, key));
		}
	} while (*arr != '0');
	*/

	/*
	// [test 0204] print_Yang_Hu_triangle
	int input = 0;
	do {
		printf("Please input number of lines:>");
		scanf("%d", &input);
		if (input > 0 && input <= 10) {
			print_Yang_Hui_triangle(input);
		}
	} while (input > 0 && input <= 10);
	*/

	/*
	// [test 0205] Yang_matix_find_num
	int arr[3][3] = { 1, 2, 3, 4, 5, 6, 7, 8, 9 };
	int k = 0;
	do {
		for (int i = 0; i < 3; i++) {
			for (int j = 0; j < 3; j++) {
				printf("%d ", arr[i][j]);
			}
			printf("\n");
		}
		printf("Please enter number want find:>");
		scanf("%d", &k);
		if (k != -1) {
			int ret = Yang_matrix_find_num(arr, 3, 3, k);
			if (ret != -1) {
				printf("Result: row %d, col %d\n", ret / 3, ret % 3);
			} else {
				printf("Not found\n");
			}
		}		
	} while (k != -1);
	*/

	/*
	// [yest 0206] is_left_rotate
	char arr1[40] = { 0 };
	char arr2[40] = { 0 };
	do {
        printf("Please enter origin string (0 for exit):v\n");
	    gets(arr1);
		if (*arr1 != '0') {
			printf("Please enter rotated string:v\n");
			gets(arr2);
			int ret = is_left_rotate(arr1, arr2);
			if (ret) {
				printf("Yes\n");
			} else {
				printf("No\n");
			}
		}
	} while (*arr1 != '0');
	*/

	/*
	// [test 0207] matrix_transpose
	int m = 0;
	int n = 0;
	do {
		printf("Please input row and col of matrix (0 0 for exit):>");
		scanf("%d %d", &m, &n);
		if (m != 0 && n != 0) {
			int arr[10][10] = { 0 };
			printf("Enter a matrix:v\n");
			for (int i = 0; i < m; i++) {
				for (int j = 0; j < n; j++) {
					scanf("%d", &arr[i][j]);
				}
			}
			printf("Result:\n");
			for (int i = 0; i < n; i++) {
				for (int j = 0; j < m; j++) {
					printf("%d ", arr[j][i]);
				}
				printf("\n");
			}
		}
	} while (m != 0 && n != 0);
	*/
    
	return 0;
}